/**
 * Copyright (c) 2012 Axa Holding Belgium, SA. All rights reserved.
 * This software is the confidential and proprietary information of the AXA Group.
 */
package chabernac.android.wordbattle;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.ImageView;

import com.larvalabs.svgandroid.SVG;
import com.larvalabs.svgandroid.SVGParser;

public class SVGTestActivity extends Activity {
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Create a new ImageView
    ImageView imageView = new ImageView(this);
    // Set the background color to white
    imageView.setBackgroundColor(Color.WHITE);
    // Parse the SVG file from the resource
    
    SVG svg = SVGParser.getSVGFromResource(getResources(), getIntent().getExtras().getInt("svg"));
    // Get a drawable from the parsed SVG and set it as the drawable for the ImageView
    imageView.setImageDrawable(svg.createPictureDrawable());
    // Set the ImageView as the content view for the Activity
    setContentView(imageView);
  }
}
